<template>
    <div>
      <p><input type="text" v-model="name"></p>
      <p><input type="text" v-model="count"></p>
      <button @click="postGrade">添加</button>
    </div>
</template>

<script>
    export default {
        name: "Grade",
      data(){
          return{
            name:'',
            count:''
          }
      },
      methods:{
          postGrade(){
            let form_data=new FormData()
            form_data.append('name',this.name)
            form_data.append('count',this.count)
            this.$axios({
              url:'/app01/grade/',
              method:'post',
              data:form_data
            })
            .then(res=>{
              console.log(res.data)
            })
          }
      },
      created() {

      }
    }
</script>

<style scoped>

</style>
